package team.szm.scd.database.vo;

import lombok.AccessLevel;
import lombok.Data;
import lombok.Setter;
import team.szm.scd.database.properties.AppointmentTimeType;

import java.time.DayOfWeek;
import java.time.LocalDate;
import java.util.*;

@Data
public class RegisterRemainVO {
    @Data
    public static class Details {
        private String doctorName;
        private float price;
        @Setter(AccessLevel.NONE)
        private List<Integer> remain = Collections.synchronizedList(Arrays.asList(0, 0, 0, 0));
        private String doctorId;

        public void setRemain(AppointmentTimeType type, int v) {
            remain.set(type.getValue() - 1, v);
        }
    }

    private LocalDate date;
    private DayOfWeek dayOfWeek;
    /**
     * 详细字典，键：医生id
     */
    private Map<String, Details> detailsMap;
}
